package com.nidu.demo.user.dto;

import com.nidu.demo.base.BaseCmd;
import com.nidu.demo.common.enums.GenderEnum;
import com.nidu.demo.common.validation.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Email;
import javax.validation.constraints.Size;

/**
 * 用户个人信息修改命令
 *
 * @author auto
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UserUpdateProfileCmd extends BaseCmd {

    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员")
    @Size(max = 64, message = "昵称长度不能超过64个字符")
    private String nickname;

    @Email(message = "邮箱格式不正确")
    @Size(max = 128, message = "邮箱长度不能超过128个字符")
    @Schema(description = "邮箱", example = "admin@example.com")
    private String email;

    @Schema(description = "性别(1:男,2:女)", example = "1")
    @InEnum(GenderEnum.class)
    private Integer gender;

}
